package com.tzl.design_pattern.strategy_pattern;

import java.math.BigDecimal;

/**
 * 支付宝支付策略
 *
 * @author Zhilei Tang
 * @date Created in 2020/11/14 17:01
 */
public class AliPayStrategy implements PayStrategy {
  @Override
  public boolean pay(BigDecimal money) {
    System.out.printf("支付宝支付了%.2f元.\n", money);
    return true;
  }

  @Override
  public BigDecimal queryBalance(String account) {
    System.out.printf("支付宝账号%s的余额为100元\n", account);
    return new BigDecimal("100");
  }
}
